/**
 *Copyright [2011-2013] [michaelwanggg@gmail.com]
 *Licensed under the Apache License, Version 2.0 (the "License");
 *you may not use this file except in compliance with the License.
 *You may obtain a copy of the License at
 *             http://www.apache.org/licenses/LICENSE-2.0
 *Unless required by applicable law or agreed to in writing,
 *software distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 *either express or implied. See the License for the specific language governing permissions and limitations under the License
 */

package com.google.code.server4j.log;

public class Log {
	
	private static Logger logger;
	static {
		logger = new ConsoleLog();
	}
	
	private static boolean isDebug = false;
	
	public static void debug(String msg) {
		if(isDebug) {
			logger.debug(msg);
		}
	}
	
	public static void debug(String msg,Throwable th) {
		if(isDebug) {
			logger.debug(msg, th);
		}
	}
	
	public static void info(String msg) {
		logger.info(msg);
	}
	
	public static void info(String msg,Throwable th) {
		logger.info(msg, th);
	}
	
	public static void warn(String msg) {
		logger.warn(msg);
	}
	
	public static void warn(String msg,Throwable th) {
		logger.warn(msg, th);
	}
	
	public static void error(String msg) {
		logger.warn(msg);
	}
	
	public static void error(String msg,Throwable th) {
		logger.error(msg, th);
	}
	
}
